Software developers improve the quality and robustness of software using unit testing. In general, unit testing refers to separately testing parts (units) of a whole software application. A unit may be, for example, a method, a class including several methods, or a package or program including many methods. When a unit refers to or depends on another unit, various techniques can be used to separately test the units, for example, mocking, stubbing, and using test doubles.
In practice, it is often not useful or possible to test a unit completely independently from another unit. For example, some units provide basic functionality that is widely used within an application. A failure of such a unit may cause widespread failure of other units that depend on that unit. In another example, collisions (e.g., simultaneous access of a database element) may occur if unit tests are executed in parallel threads, resulting in indeterministic failures during execution of the unit tests. In a further example, client-server applications integration tests that use unit testing typically fail when the server is not available. The integration tests then also fail.